;************************************************* *****************************
; 306_U11.FIL f r TOSPATCH V2.9.8 (7/11/99)?

; 02-08-11 Z70_D09.FIL
; - NOVABS50 with PAK/3-Logo

; 20-11-11 306_D10.FIL
; - ROMTOP introduced leads, f r-code extensions behind original TOS??
; - WINX 2.2 with Patch File WINX.FIL (from TP306V20)

; 21-12-11 306_US1.FIL
; - RSC area behind $ E40030 postponed due to Patch Boot
, - 1.5 from TP306V20 ARROWFIX replaced old routine of Harun

;************************************************* *****************************
; Switch f r different patch versions?

..? NATION = U.S., TOS nationalities t (? M currently possible: FRG, USA, UK, FRA)

;------------------------------------------------- -----------------------------
; Other switches (default: all in .0)

. WINX = 0; WINX 2.2 by Martin Osieka (as in TP306V20)
;? New Window Management, lt also contains the patch Arrowfix
,.. In NATION <> FRG WINX is automatically set to 0.

. StaticRAM = 0; This is a TOS f r Static RAM?. Special features:
; - ROM (1MB at $ E00000) in MMU Table Read-protected?
; - System maintenance for "Bad CRC in ROM chip xx"

. NOVA = 0; control of NOVA graphics card during the boot
; Logo, RAM test, etc. are visible on the screen NOVA

. Grafik_Bombs = 0; bombs on a graphics card / graphics output extensions
; Works with all systems, f r graphics card owners?
; With attached ST-screen, it is possibly interesting
; Remove this patch, since the bombs there visible
; Remain.

. HasTTMfp = 0; This ST has retrofitted a constant TT-MFP?

. NoDriveB = 0; search for drive B: stop on boot.
;? Verk rzt the boot time by about 3 sec
; The logical drive B along with icon there anyway.
; Clear: Only set to .1, if no second floppy
; Drive is connected.

. HDwait = 0; Warter plate after the RAM test, instead of waiting bar

;------------------------------------------------- -----------------------------
; Other switches (default: all at .1)

. ARROWFIX = 1; ARROWFIX 1.5 of Martin Osieka (as in TP306V20)
; New GEM-scrolling routines
,. In WINX = 1 ARROWFIX is automatically set to 0.

. BPatch = 1; XBIOS floppy patches of Harun Scheutzow trad gene?
, -? Floppy Getbpb routine of the TOS completely new LinkedIn
; - Floppy Rwabs routine of the TOS shall be partially renewed

. GrowShrink = 1; Grow and Shrinkboxen: 1 = on (like the original 3.06), 0 = off

. FASTPRN = 1, f fast printer's parallel port routines r: 1 = one?

;------------------------------------------------- -----------------------------
; Other variables

. Bootwait = .80; time (sec) f r waiting bar at cold start (Orig 80 sec)?

. Print wait = .30; printer timeout (sec) (Orig 30 sec)

. DefHDinf = .3; Step default rate set (0 = DD, 3 = HD = original 3.06)
; In Step 3, the rate is set to 6ms.
; For HD modules with hardware-Step Rate Increase
; Set to 0 so that the drive is quilted with 3ms.

;************************************************* *****************************
; Einleseformat of the patch program

. WIDTH = .32, and when we split, please do so in four bytes
. BASE = E00000, TOS-ROM address (default $ E00000)
. LENGTH = 80000, TOS-length L (default $ 80,000)?

;------------------------------------------------- -----------------------------
_Switch. NATION

. _CASE FRG:
  <306_FRG.ORI; original TOS 3:06 TT-German (CRC 2272.6158.13C5.2020)
  . ROMTOP = 46 232; first address behind the original RSC / NEWDESK.INF
; From this place for extensions
. _CASE USA:
  . WINX =. 0; No German TOS: WINX always Unignore!
  <306_USA.ORI; original American TOS 3:06 (CRC 514F.7DE4.797D.963C)
  . ROMTOP = 46 134; first address behind the original RSC / NEWDESK.INF

. _CASE UK:
  . WINX =. 0; No German TOS: WINX always Unignore!
  <306_USA.ORI; original TOS 3:06 TT-US
  PATCHFLD.Z8-\; Dsetpath ("patchfld.z8 \")
  + _US2UK.FIL; Generate UK-USA-TOS TOS
  -.. \; Dsetpath ('..')
  . ROMTOP = 46 134; first address behind the original RSC / NEWDESK.INF

. _CASE FRA:
  . WINX =. 0; No German TOS: WINX always Unignore!
  <306_FRA.ORI; original TOS 3:06? French (CRC 1001.847B.5E08.C44E)?
  . ROMTOP = 464F0; first address behind the original RSC / NEWDESK.INF

_DEFAULT:
  _ERROR "Nation is not supported? Protected"

_ENDSWITCH

;------------------------------------------------- -----------------------------
= 24/09/1991, NATION,. T mu version and nationalities?? vote (otherwise Message!)
Ý, calculating and setting the CRC checksum of Pr TOS?.

;------------------------------------------------- -----------------------------
; Output format of the patch program

, Create a file (TOS.IMG)> 1
> 4, PAK3; split for burning (EE = U10, U11 = OE EO = U12, U13 = OO)

;************************************************* *****************************
; Call the patch files

PATCHFLD.Z8-\; Dsetpath ("patchfld.z8 \")

;------------------------------------------------- -----------------------------

_if. WINX = 1
 . ARROWFIX = 0; WINX is active: Then Unignore ArrowFix!

 . GLOBAL =% 1111111111111; Global switches (right: switch 1)
 . LOCAL =% 111111111111; Local switch (right: switch 1)
 . DESKTOP =% 111111111111; desktop switch (right: switch 1)
 . INIT_SCROLL = .460; Initial scroll delay in ms
 . CONT_SCROLL = .40; Continuous scrolling delay in milliseconds
 . CONT_CLOSE = .1000; Continuous close delay in milliseconds
 . CONT_FULL = .2000; Continuous full delay in ms

 + WINX.FIL; WINX 2.2: New window management (as in TP306V20)
 ; Original routines from WINX 2.2, incl Arrowfix patch
 ,. NATION (FRG)
_ENDIF

_if. ARROWFIX = 1
 . TIME = 3; response in 0.125 s (original value is 3)

 + P_ARROW2.FIL; ARROWFIX 1.5: New GEM-scrolling routines (as in TP306V20)
 ,. NATION (FRG, USA, UK, FRA)
_ENDIF

;************************************************* *****************************

? P_INIT4.FIL + f patchfile TOS r f r 3:06 PAK / 3:? Initialization
;? Changes gg?. _20_30.FIL PATCHFLD.SE from:
, -? The TOS has been refurbished and truly cleaned and is now the beginning of
;? A bin rfile (begin71.b) is read. This eliminates
And some patches of INIT.FIL and 20_30.FIL
, - When booting the FPU is now back with frestore
;? To ckgesetzt, as well as in the original 3:06
, -? Memvalid-Pr fung (decision whether hot or cold start)
, Before the memory configuration is set in the MCU
; Zim 20/12/2011: RCS range is shifted r f boot patch?
; P_INIT4.FIL sets the variables and ROMTOP TOS_INFO that..
;?? Sp ben ter may be taken
; Warning: _US2UK writes in the (old) RSC area!
,. NATION (FRG, USA, FRA)

? + P_MMU3.FIL; Patch File f r f TOS 3:06 PAK r / 3: 020/030-Abh dependences??
; Used variables: NATION StaticRAM..
;? Changes gg?. _20_30.FIL PATCHFLD.SE from:
, - 'Cache' instead of 'blitter' now available in English TOS
, - Reset MMU and MMU init removed because of early-TOS
;? Now than I rfile is read (begin71.b)
.., - Instead of ENG NATION, extended to: FRG, USA, UK, FRA

? + P_VIDEO3.FIL; Patch File f r f TOS 3:06 PAK r / 3: Video-initialization?
; Used variables:.. NATION Grafik_Bombs
;? Changes gg?. _VIDEO.FIL PATCHFLD.SE from:
, - From TP306V20: video mode again, corrections
, - From TP306V20: Adaptation of v_opnwk
; Farbinitialisierung works again
, - From TP306V20: New vs_color vq_color and routines
;? K now the colors can be adjusted
.., - Instead of ENG NATION, extended to: FRG, USA, UK, FRA

?? + P_RTC.FIL; Patch File f r f TOS 3:06 PAK r / 3: Routines f r mega-Clock?
; Variables Used: None
;? Changes gg?. _RTC.FIL PATCHFLD.SE from:
; -? Patch completely refurbished and truly cleaned LinkedIn
, - Initialization at boot get_rtc calls directly
; - XBIOS calls the low-level routines with jsr, the
;? Detour via tget_rtc and subsequently jmp (A3) N filled??
, - Low-level routine tget_rtc is now unemployed
; - Year 2000 patch f r the Clock in the keyboard processor?

? + P_MFP.FIL; Patch File f r f TOS 3:06 PAK r / 3: MFP routines?
; Used variables. HasTTMfp
;? Changes gg?. _MFP.FIL From PATCHFLD.SE: Just Optics

? + P_DRIVE4.FIL; Patch File f r f TOS 3:06 PAK r / 3: Drive Stories?
; Used variables: NATION NoDriveB DefHDinf BPatch....
;? Changes gg?. _DRIVES.FIL PATCHFLD.SE from:
, - BIOS floppy: access to TT-Reg. $ FF860E removed
; - Floppy BIOS: Track 1 Track 10 takes away
, - BIOS floppy: floppy waiting break away
; - New Floppy XBIOS routines to Zim (flop_24m)
- If this NoDriveB: No search for drive B:.
., - If BPatch: GetBPB patch v. Harun Scheutzow (bpb_hs2)
., - If BPatch: Rwabs patch (rwabszi6) v. Harun Scheutzow
; - DefHDinf. Default-step weight rate can be selected?
;? Changes gg?. _ADDITIO.FIL PATCHFLD.SE from:
; Used variables:.. NATION HDwait
- If this HDwait. Warter plate instead of beams, but
F r only German TOS?
, -. Additional variable N filled?
.., - Instead of ENG NATION, extended to: FRG, USA, UK, FRA

? + P_STD4.FIL; Patch File f r f TOS 3:06 PAK r / 3: Standard TOS patches?
; Used variables:... Bootwait FASTPRN print wait
;? Changes gg?. _STANDRD.FIL PATCHFLD.SE from:
, -. Wait to boot (set in MAIN)
, -. Wait to print (set in MAIN)
; - Autoexec stack pointer and memory-list patch
But now also in English TOS
, -? Length of this beam according boat Wait Wait.
;? Changes gg?. _ADDITIO.FIL PATCHFLD.SE from:
; Used variables. GrowShrink VDIFIX.
., - If GrowShrink =. 0: Grow and Shrinkboxen off,
, - From TP306V20?? VDIFIX introduced gt (still off)
,. NATION (FRG, USA, UK, FRA)

;------------------------------------------------- -----------------------------
; Gerhard Huber (implemented by MH, adapted from Zim)
; Control of NOVA graphics card during the boot.
; F r all NOVA graphics cards except type 2 and 6?
; Zim 20:11:11. ROMTOP now instead of a fixed destination address 46 232
; Therefore, no collisions with other extensions
; Uabh by NATION-dependent, it must only be defined ROMTOP?..

_if. NOVA

 $ 4E 74A, F9, ROMTOP +8 + BASE.L,.. Entry point to the nova patch (from NOVABS40)

 . ROMTOP; pointer to free space behind ROM code
 ~ NOVABS50.B; nova integrated patch
 !. ROMTOP +8 .. ~; Relozieren The patch does not

 . ROMTOP:; pointer to free space now displays behind this patch

_ENDIF; End of NOVA.

;------------------------------------------------- -----------------------------
-.. \; Dsetpath ('..')

;************************************************* *****************************
; TOS Info dialog change (29 characters + $ 00, all in the original '-')?

. TOS_INFO
~ '3.06.US1'; 10 characters
~'--------'; 8 characters
~ 'For PAH / 3', 0, 11 characters + end identifiers

;************************************************* *****************************
